﻿using DocumentFormat.OpenXml.Lite.DrawingML.Chart.Axes;
using DocumentFormat.OpenXml.Lite.DrawingML.Geometry.Properties;
using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.DrawingML.Chart
{
    [XmlRoot("plotArea", Namespace = Constants.Chart)]
    public class PlotArea : XmlSerializable
    {
        [Optional]
        [XmlElement("layout", Namespace = Constants.Chart)]
        public Layout Layout { get; set; }

        [XmlElement("", Namespace = Constants.Chart)]
        public XmlList<IChartElement> Charts { get; set; }

        [Optional]
        [XmlElement("", Namespace = Constants.Chart)]
        public XmlList<IAxis> Axes { get; set; }

        [Optional]
        [XmlElement("dTable", Namespace = Constants.Chart)]
        public DataTable DataTable { get; set; }

        [Optional]
        [XmlElement("spPr", Namespace = Constants.Chart)]
        public ShapeProperties ShapeProperties { get; set; }

        [Optional]
        [XmlElement("extLst", Namespace = Constants.Chart)]
        public ExtensionList ExtensionList { get; set; }

        public PlotArea()
        {
            Axes = new XmlList<IAxis>();
            Charts = new XmlList<IChartElement>();
        }
    }
}
